-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Ubuntu VM script #269
base: main
Are you sure you want to change the base?
Conversation
I don't see the need for this script, To choose a version I have to go to all the advanced options, there are separate scripts for this reason. |
Ubuntu focal has end of standard support april 2025, we do not want to add that option now. Oracular is not LTS. I'm not totally opposed to having one Ubuntu VM script which defaults to noble and with the option to downgrade to jammy in advanced options. This would make it consistent with the Ubuntu LXC (where we should update default version to noble). This is also a VM script so it should not be a breaking change to existing users. |
What is your opinion? I've skimmed through it and am rather against a merge. That's what the advanced settings are for. |
@@ -2,17 +2,18 @@ | |||
|
|||
# Copyright (c) 2021-2024 tteck | |||
# Author: tteck (tteckster) | |||
# irish1986 (irish1986) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# irish1986 (irish1986) | |
# Co-Author: irish1986 (irish1986) |
@@ -21,6 +22,11 @@ echo -e "\n Loading..." | |||
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') | |||
NEXTID=$(pvesh get /cluster/nextid) | |||
|
|||
ORACULAR="oracular" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ORACULAR="oracular" |
ORACULAR="oracular" | ||
NOBLE="noble" | ||
JAMMY="jammy" | ||
FOCAL="focal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FOCAL="focal" |
} | ||
|
||
function advanced_settings() { | ||
if RELEASE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu RELEASE" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if RELEASE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu RELEASE" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ | |
if RELEASE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 2 \ |
consistent with LXC
} | ||
|
||
function advanced_settings() { | ||
if RELEASE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu RELEASE" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ | ||
"${ORACULAR}" "oracular " OFF \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"${ORACULAR}" "oracular " OFF \ |
"${ORACULAR}" "oracular " OFF \ | ||
"${NOBLE}" "noble " ON \ | ||
"${JAMMY}" "jammy " OFF \ | ||
"${FOCAL}" "focal " OFF \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"${FOCAL}" "focal " OFF \ |
if RELEASE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu RELEASE" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ | ||
"${ORACULAR}" "oracular " OFF \ | ||
"${NOBLE}" "noble " ON \ | ||
"${JAMMY}" "jammy " OFF \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move jammy option above noble, to be consistent with LXC
fi | ||
msg_ok "Completed Successfully!\n" | ||
echo -e "Setup Cloud-Init before starting \n | ||
More info at https://github.com/tteck/Proxmox/discussions/2072 \n" | ||
More info at https://github.com/community-scripts/ProxmoxVE/discussions/268 \n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More info at https://github.com/community-scripts/ProxmoxVE/discussions/268 \n" | |
More info at https://github.com/community-scripts/ProxmoxVE/discussions/272 \n" |
VMID="$NEXTID" | ||
FORMAT=",efitype=4m" | ||
MACHINE="" | ||
DISK_CACHE="" | ||
HN="ubuntu" | ||
HN="ubuntu-${NOBLE}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens to hostname if you choose jammy in advanced settings? you have to manually fix it?
Hello everyone, Thank you for the discussion and the proposed changes, especially by @havardthom. I would, however, like to suggest an alternative approach: Instead of having a single script for multiple versions, I’d prefer keeping separate scripts for each version.
While I agree that the changes suggested by @havardthom make sense, they further reduce the need for a centralized script, especially since Ubuntu Focal will soon (Yes! 6 month is soon) reach its End of Standard Support and Oracular not being an LTS release. This would again strip the script down to just 2 versions which is as shown above just a simple 2 digit change in the url. For this reason, I would suggest not adding a unified script and instead sticking to separate scripts for each version. |
Should the Ubuntu LXC also be multiple scripts then? For me both of the approaches works, but we should pick one and be consistent. The approach we choose should also apply to all OS scripts in the future. |
I would definitely suggest that we keep them separated. The only thing that would be important now and in the future is the naming convention of the scripts themself for all OS Scripts this should also be consistent as you said. |
Actually I just remembered that the ability to choose OS version is baked into advanced settings for all LXCs, so the discussion is not applicable there. With that in mind I'm leaning more to having it similar for the vm, with targeting version in advanced settings. I get the URL point, but you can also argue that having a single URL for ubuntu which does not change every 2 years is more user friendly. Then I can run the same URL every time without having to consider what version I want beforehand, maybe I don't care and just want the recommended/default version. If I do care, I run advanced settings and choose my version, just like an LXC. In 2026 it would be 3 ubuntu scripts. 3 scripts and 3 documentation sites that need to be considered and synchronized when changes are proposed. |
I understand the argument, but I see it differently. Once I care about the version, I have to go into the advanced settings to select it. Up until now, this hasn’t been necessary. Now, if we switch to a shared script and the version is only selected through advanced settings, the simple process of creating an Ubuntu 22.04 LXC would be changed. What could be considered in my opinion is building the consolidated script in such a way that you can directly pass an argument for the version when calling it. The option with the advanced settings is surely not that bad. But forcing into Advanced Settings to choose the Version, i dont think should be the way to go! |
Building a consolidated script would break the established conventions and patterns. Letting the user choose OS version without having to use advanced settings (and without having separate scripts for each version) is something we can consider in the future. As it stands today, all LXCs have OS version choice in advanced settings (like it has always been) and I think VMs should be the same until we choose to make that improvement. |
Note
We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.
Description
Create a new generic ubuntu-vm script that allows the user ot select which version of ubuntu should be installed.
Type of change
Please check the relevant option(s):
Prerequisites
The following efforts must be made for the PR to be considered. Please check when completed:
Additional Information (optional)
C&C are welcomed via PR comments.
Related Pull Requests / Discussions
If there are other pull requests or discussions related to this change, please link them here: